import Vue from 'vue'
import Vuex from 'vuex'
import getters from './getters'
Vue.use(Vuex)

// module.exports = {}  name.js
// export default {}
// const setting = require('./name')
// var img = require('../../../static/img/7.jpg')

const files = require.context('./modules', false, /\.js$/)
const modules = {}
files.keys().forEach((item, index) => {
  modules[item.replace(/(\.\/|\.js)/g, '')] = files(item).default
})
const store = new Vuex.Store({
  modules,
  getters
})
export default store
